  <div id='home_banner'> <img src="<?php echo base_url();?>public/skin/front-end/images/banner/banner.jpg" /></div>   
  <div class='block_content'>      	
   <h1><?php echo front_element('textfield', 'tieu_de_chao_mung', $elements);?></h1>
      <div class="line5"></div>   
    <div class="block_style01">
        <?php echo front_element('richtext', 'noi_dung_chao_mung', $elements);?>
    </div>       
  </div>  
  <div class="line5"></div>
   <?php if(count($product_no_sale)>0): ?>
   <div class="block_content">
   <h1>CÁC THIẾT BỊ PHỤC VỤ SẢN XUẤT</h1> 
            <div class='item_block'>
             <?php
            $i=1;
            foreach ($product_no_sale as $item): ?> 
            <div class="item">
                <?php if ($item['showtype'] == 1)
                    $showText = 'class="modalInput" rel="#forwarder_info"';
                else
                    $showText = '';
                ?>
                <a href="javascript:void(0)" id="<?php echo $item['id'] ?>" <?php echo $showText ?>>
                    <img src="<?php echo base_url()."public/upload/".$item['images']; ?>" class="p_img">
                </a>
                <div id="content_<?php echo $item['id'] ?>" style="display: none">
                    <?php echo $item['description']; ?>
                </div>
                <div class="content">
                    <h3 id="produc_name_<?php echo $item['id']; ?>"><?php echo $item['name'] ?></h3>
                </div>
                <div class="description">
                     <?php if ($item['showtype'] == 0): ?>
                        <?php echo $item['description']; ?>
                    <?php endif; ?>
                </div>
            </div>
                <?php if($i++ % 2 == 0): ?>
                <div class="clear"></div>
                <?php endif; ?>
          <?php endforeach; ?>
        </div>
   </div> 
   <?php endif; ?>
   <div class="line_break"></div>
   <div class="line5"></div>
   <?php if(count($product)>0): ?>
   <div class="block_content">
   <h1>SẢN PHẨM BÁN NHIỀU NHẤT</h1> 
            <div class='item_block'>
            <?php
            $i=1;
            foreach ($product as $item): ?> 
            <div class="item">
                <?php if ($item['showtype'] == 1)
                    $showText = 'class="modalInput" rel="#forwarder_info"';
                else
                    $showText = '';
                ?>
                <a href="javascript:void(0)" style="position: relative" id="<?php echo $item['id'] ?>" <?php echo $showText ?>>
                    <img src="<?php echo base_url()."public/upload/".$item['images']; ?>" class="p_img">
                    <?php if ($item['hot_item'] == 1) :?>
                    <img style="position: relative;right: 38px;top: 8px;" src="<?php echo base_url();?>public/skin/front-end/images/icon/icon-hot.gif"/>
                    <?php endif; ?>
                </a>
                <div id="content_<?php echo $item['id'] ?>" style="display: none">
                    <?php echo $item['description']; ?>
                </div>
                <div class="content">
                    <h3 id="produc_name_<?php echo $item['id']; ?>"><?php echo $item['name'] ?></h3>
                    <?php if(!empty($item['price'])): ?>
                    <p><label>Giá </label>:&nbsp;&nbsp;<strong><?php echo $item['price'] ?></strong></p>                        
                    <?php endif; ?>
                    <p><a class="order" href="/order/<?php echo $item['id'] ?>"><strong>Đặt Hàng</strong></a></p>                        
                </div>
                <div class="description">
                     <?php if ($item['showtype'] == 0): ?>
                        <?php echo $item['description']; ?>
                    <?php endif; ?>
                </div>
            </div>
                <?php if($i++ % 2 == 0): ?>
                <div class="clear"></div>
                <?php endif; ?>
          <?php endforeach; ?>
        </div>
   </div> 
   <?php endif; ?>
   <div class="line_break"></div>
   <div id='home_promotion_banner'> 
   <br/><center>
       <a href="<?php echo './khuyenmai.html';?>">
           <img src="<?php echo base_url();?>public/skin/front-end/images/banner/banner_promotion.jpg" />
       </a>
	   </center>
   </div>   
<!--   <div class="line_break"></div>
   <div class="block_content">
   <h1>SẢN PHẨM NHẬP KHẨU TRỰC TIẾP TỪ MỸ</h1>
   <div class="line5"></div>
   <div class="logo_list">
    <img  src="<?php echo base_url();?>public/skin/front-end/images/logo/h1.jpg" />
    <img  src="<?php echo base_url();?>public/skin/front-end/images/logo/h2.jpg" /> 
    <img  src="<?php echo base_url();?>public/skin/front-end/images/logo/h3.gif" />
    <img  src="<?php echo base_url();?>public/skin/front-end/images/logo/h4.jpg" />        
    <div class="clear"></div>
   </div>
   </div>-->


<div class="modal" id="forwarder_info">
    <h2 id="product_name_overplay">This is a modal dialog</h2>
    <br/>
    <div id='product_content_overplay' style="color: black;padding-left: 20px;">
        No Content
    </div>
    <br/>
    <button style="float: right" class="close"> Close </button>
</div>

<script>
      
    (function ($) {
        $(document).ready(function(){
            var triggers = $(".modalInput").overlay({
                
                mask: {
                        color: '#ebecff',
                        loadSpeed: 200,
                        opacity: 0.8
                },
                top:200,
                closeOnClick: false,            
                onBeforeLoad: function(obj) {
                    var overlay = this.getOverlay();
                    var clickObj = this.getTrigger();
                    var productID = clickObj.attr('id');
                    overlay.find('#product_name_overplay').html($('#produc_name_'+productID).html());
                    overlay.find('#product_content_overplay').html($('#content_'+productID).html());
                }
            });
            //--------------------------------
          
        });
    }(jQuery));
</script>
